<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        * {
            padding: 0;
            margin: 0;

        }

        body {
            background: #ddd;
        }

        #canvas {
            margin: 10px;
            background: #fff;
            border: thin inset #aaa;
        }
    </style>

</head>
<body>
<canvas id='canvas' width='600' height='300'>
    Canvas not supported!
</canvas>
<script src="../shared/shared.js"></script>
<script>
    onload = function () {
        var canvas = document.getElementById('canvas');
        var ctx = canvas.getContext('2d');//d必须小写
    }
</script>
</body>
</html>